<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- Bootstrap Styles-->
    <link rel="stylesheet" type="text/css"  th:href="@{/css/text/bootstrap.css}"/>
    <link rel="stylesheet" type="text/css"  th:href="@{/css/text/bootstrap-theme.min.css}"/>
    <link rel="stylesheet" type="text/css"  th:href="@{/css/text/bootstrap-admin-theme.css}"/>
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
</head>
<body class="bootstrap-admin-with-small-navbar">
<nav class="navbar navbar-default navbar-inverse navbar-fixed-top " role="navigation">
    <div class="container">
        <div class="row">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" th:href="@{../user/index}">GMS</a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li class="active"><a th:href="@{../user/index}">首页</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">场地<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a th:href="@{../toPlaceApply1}">预约场地</a></li>
                            <li><a th:href="@{../toPlaceUse}">场地使用</a></li>
                            <li><a th:href="@{../toUserPlaceApply}">预约退订</a></li>
                            <li><a th:href="@{../toStanderDetail}">场地收费标准</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">器材<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a th:href="@{../equipment/showEquipment}" >租借</a></li>
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">赛事<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a th:href="@{../event/touserevent(pageNum=1,userId=${session.username})}">我的赛事</a></li>
                            <li><a th:href="@{../event/toeventcreate}">创建赛事</a></li>
                        </ul>
                    </li>
                    <li class="active">
                        <a th:href="@{../notice/tonoticeuser}">网站公告</a>
                    </li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li th:if="${session.permission}!='0'" ><a th:href="@{../management}">管理后台</a></li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">用户<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a th:href="@{../user/toChangeuser}">修改资料</a></li>
                            <li><a th:href="@{../user/toChangepassword}">修改密码</a></li>
                            <li class="divider"></li>
                            <li><a th:href="@{/login}">退出登录</a></li>
                        </ul>
                    </li>
                </ul>
            </div><!-- /.navbar-collapse -->
        </div>
    </div>
</nav>
<div class="container">
    <!-- left, vertical navbar & content -->
    <div class="row">
        <div class="row bootstrap-admin-no-edges-padding">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="text-muted bootstrap-admin-box-title">我的赛事</div>
                    </div>
                    <div class="rbody" id="app">
                        <div class="main">
                            <div class="table-responsive">
                                <table class="table table-striped ">
                                    <tr>
                                        <th>赛事ID</th>
                                        <th>赛事名称</th>
                                        <th>申请用户</th>
                                        <th>赛事负责人</th>
                                        <th>负责人电话</th>
                                        <th>赛事状态</th>
                                        <th>操作</th>
                                    </tr>
                                    <tr th:each="event:${page.records}">
                                        <td  th:text="${event.EventId}"></td>
                                        <td th:text="${event.EventName}"></td>
                                        <td th:text="${event.Applicants}"></td>
                                        <td th:text="${event.EventPrincipal}"></td>
                                        <td th:text="${event.PrincipalPhone}"></td>
                                        <td th:text="${event.EventStatus}"></td>
                                        <td>
                                            <button type="button">
                                                <a th:href="@{../event/toeventupdate(EventId=${event.EventId})}">进入</a>
                                            </button>
                                        </td>
                                    </tr>
                                </table>
                                <ul class="pagination" style="float: right;" th:if="${page.total != 0}">
                                    <li class=""th:classappend="${page.current == 1} ? 'disabled' : '' ">
                                        <a th:href="@{../event/touserevent(pageNum=${page.current}-1,userId=${session.username})}">&laquo;</a>
                                    </li>
                                    <li class=""th:classappend="${page.current == i} ? 'active' : '' " th:each="i:${#numbers.sequence(1,page.pages)}">
                                        <a th:href="@{../event/touserevent(pageNum=${i},userId=${session.username})}"><span th:text="${i}"></span></a>
                                    </li>
                                    <li class=""th:classappend="${page.current == page.pages} ? 'disabled' : '' ">
                                        <a th:href="@{../event/touserevent(pageNum=${page.current}+1,userId=${session.username})}">&raquo;</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</body>
</body>
</html>